﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SmartPhoneClient
{
    public partial class Form5 : Form
    {
        public Form5()
        {
            InitializeComponent();
        }

        private void menuItem1_Click(object sender, EventArgs e)
        {
            string tableID = Infomation.tableID;
            string foodID = textBox1.Text;
            string cookID = textBox2.Text;
            string custNotes = textBox3.Text;
            string command = "AddOrderItem|" + tableID + "|" + foodID + "|" + cookID + "|" + custNotes;
            Byte[] outbytes = System.Text.Encoding.Unicode.GetBytes(command.ToCharArray());
            Infomation.MySocket.Send(outbytes, outbytes.Length, 0);
            treeView1.Nodes.Add("菜号：" + foodID + "  厨师号：" + cookID + "  备注：" + custNotes);

            textBox1.Text = "";
            textBox2.Text = "0";
            textBox3.Text = "无";
        }

        private void menuItem2_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void Form5_Load(object sender, EventArgs e)
        {

        }
    }
}